<template>
  <mid-dialog-box v-if="showDialog" @closeMidDialog="closeMidDialog" :title="title">
    <div class="agreementContent width_100">
      <iframe src="https://hfsession.com/agreement/" frameborder="0"></iframe>
    </div>
    <div class="footer flex-center">
      <div class="disagree cp" @click="closeMidDialog">不同意</div>
      <div class="agree cp" @click="agree">同意并继续</div>
    </div>
  </mid-dialog-box>
</template>

<script>
export default {
  data () {
    return {
      showDialog: true,
      title: '用户协议及隐私协议'
    }
  },
  methods: {
    // 关闭协议框
    closeMidDialog () {
      this.$router.push('/Login')
    },
    // 同意协议
    agree () {
      this.showDialog = false
    }
  }
}
</script>

<style lang="scss" scoped>
.agreementContent {
  height: 460px;
  padding: 17px 30px 0;
  overflow: hidden;
  iframe {
    width: 100%;
    height: 100%;
  }
}
.footer {
  margin-top: 20px;
  div {
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    line-height: 40px;
  }
  .disagree {
    width: 136px;
    height: 40px;
    border: 1px solid #d8dee9;
    border-radius: 2px;
    color: #304EEC;
    margin-right: 12px;
  }
  .agree {
    width: 136px;
    height: 40px;
    background: linear-gradient(225deg, #4750ec 1%, #6971fe 98%);
    border-radius: 2px;
    color:#fff;
  }
}
</style>
